package com.ap.core.validation.message.rules;

import com.ap.core.message.managemerchant.info.RequestMerchantRegistrationTypeInfo;
import com.ap.core.validation.message.info.MessageValidationInfo;
import com.ap.core.validation.message.info.OriginalInfo;

/**
 * User: Dilip.Sridhar
 * Check if provided Distributor ID is in Active Status
 */
public class RV0002ForMerchantRule extends AbstractDistributorCheckRule<RequestMerchantRegistrationTypeInfo, OriginalInfo> {

    @Override
    public boolean validate(MessageValidationInfo<RequestMerchantRegistrationTypeInfo,OriginalInfo> infoObject) {        
        return isDistributorActive(infoObject.getBoundObject().getDistributorId());
    }


}
